public class TestFactorial {

	public static void main(String[] args) {
		System.out.println(fact(4));
	}

	static int fact(int n) {
		int result = 1;

		if (n == 1)
			return 1;

		result = fact(n - 1) * n;
		return result;
	}

}
